import java.util.Scanner;

public class RPG {
    public static void main(String[] args) {
        System.out.println("************************************");
        System.out.println(" 欢迎来到  ##咸鱼大乱斗##  的世界！");
        System.out.println("************************************");
        Scanner scanner1 = new Scanner(System.in);
        Scanner s = new Scanner(System.in);
        System.out.printf("请选择角色！%n1.李百乾%n2.杨效宸%n3.胡佩伦%n");
        System.out.printf("你的选择是：");
        int tempName = s.nextInt();
        if(tempName == 1) {
            libai libai1 = new libai();
            libai1.setName("李百乾");
            System.out.println("你是" + libai1.getName());
            System.out.println("请输入李白的等级和血量！");
            libai1.setLevel(scanner1.nextInt());
            libai1.setBlood(scanner1.nextInt());
            //System.out.printf("李百乾的当前状态为%n 等级：%d 血量：%d %n", libai1.getLevel(), libai1.getBlood());
            Skill(libai1);
        }
        else if(tempName == 2) {
            xiaochen role = new xiaochen();
            role.setName("杨效宸");
            System.out.println("你是" + role.getName());
            System.out.println("请输入效宸的等级和血量！");
            role.setLevel(scanner1.nextInt());
            role.setBlood(scanner1.nextInt());
            Skill(role);
        }
        else if(tempName == 3) {
            peilun role = new peilun();
            role.setName("胡佩伦");
            System.out.println("你是" + role.getName());
            System.out.println("请输入佩伦的等级和血量！");
            role.setLevel(scanner1.nextInt());
            role.setBlood(scanner1.nextInt());
            Skill(role);
        }
        else System.out.println("error!");
    }

    static void Skill(test1 role) {
        System.out.println(role);
        System.out.println();
        System.out.println("**角色出场！使出了出场技能！**");
        System.out.println();
        role.fight();
        System.out.println(role);
        //System.out.printf("李百乾的当前状态为%n等级：%d 血量：%d %n", role.getLevel(), role.getBlood()+100);

    }
}
